<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['系统配置','第三方程序配置']" icon="fa fa-cog" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span><h2>第三方程序配置</h2></header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<button  type="button"  class="btn btn-primary" (click)="table_add(appletsModal)">新增程序</button>
							<div class="right top-search">
								<input type="text" [(ngModel)]="tableParam.searchKey" (change)="tableSearch()" class="search-input" placeholder="程序名字/程序描述">
								<span class="top-search-box">
							        <button class="top-search-btn" type="button" (click)="tableSearch()"> <i class="fa fa-search"></i></button>
							    </span>
							</div>
						</div>
						<div class="table_scroll">
							<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th>程序名字</th>
										<th>程序编号</th>
										<th>配置信息</th>
										<th>程序描述</th>
										<th>创建时间</th>
										<th>更新时间</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData" >
										<td>{{row.appletsName}}</td>
										<td>{{row.appletsCode}}</td>
										<td>{{row.configJson}}</td>
										<td>{{row.describe}}</td>
										<td>{{row.createTime}}</td>
										<td>{{row.updateTime}}</td>
										<td>
											<button type="button" (click)="table_edit(row,appletsModal)" >编辑</button>
											<!-- <button type="button" (click)="table_del(row)">删除</button> -->
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator [totalRecords]="totalCount"
						           [rows]="pageSize"
						           [currentPage]="curPage - 1"
						           (onPageChange)="paginate($event)">
							</paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- 新增编辑   弹窗-->
	<section bsModal #appletsModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
		<div class="modal-dialog modal-lg" >
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" (click)="appletsClose(appletsModal)" aria-label="Close"><span aria-hidden="true">&times;</span></button>     
					<h4 class="modal-title"><span *ngIf="formType == 'new'">新增</span><span *ngIf="formType == 'updata'">编辑</span>第三方程序配置</h4>
				</div>
				<form id="appletsFrom"  class="form-horizontal" role="form" novalidate="novalidate" [saBootstrapValidator]="validatorOptions">
					<div class="modal-body">
						<div class="row form-horizontal">
							<!-- <div class="form-group col-xs-12">
								<label class="col-xs-3 control-label">appId<sup>*</sup></label>
								<div class="col-xs-9">
									<input class="form-control" type="text"  [(ngModel)]='appletsFrom.appId' name='appId' placeholder="请输入appId"/>
								</div>
							</div>
							<div class="form-group col-xs-12">
								<label class="col-xs-3 control-label">appSecret<sup>*</sup></label>
								<div class="col-xs-9">
									<input class="form-control" type="text"  [(ngModel)]='appletsFrom.appSecret' name='appSecret'placeholder="请输入appSecret"/>
								</div>
							</div> -->
							<div class="form-group col-xs-12">
								<label class="col-xs-3 control-label">程序名字<sup>*</sup></label>
								<div class="col-xs-9">
									<input class="form-control" type="text"  [(ngModel)]='appletsFrom.appletsName' name='appletsName' placeholder="请输入程序名字"/>
								</div>
							</div>
							<div class="form-group col-xs-12">
								<label class="col-xs-3 control-label">程序描述<sup>*</sup></label>
								<div class="col-xs-9">
									<input class="form-control" type="text"  [(ngModel)]='appletsFrom.describe' name='describe' placeholder="请输入程序描述"/>
								</div>
							</div>
							<div class="form-group col-xs-12">
								<label class="col-xs-3 control-label">配置信息<sup>*</sup></label>
								<div class="col-xs-9">
									<textarea class="form-control" type="text"  [(ngModel)]='appletsFrom.configJson' name='configJson' placeholder="请输入配置信息"></textarea>
								
								</div>
							</div>
	                   	</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" (click)="appletsClose(appletsModal)">取消</button>
						<button type="button" class="btn btn-primary" (click)="appletsSubmit(appletsModal)">确认</button>
					</div>
				</form>
			</div>
		</div>
	</section>
	<!-- 新增编辑 弹窗end-->
	</sa-widgets-grid>
</div>